package com.ytt.core.service.entity.scores;

import com.ytt.core.model.scores.ScoresType;
import com.ytt.core.service.entity.AbstractBaseEntity;
import com.ytt.core.service.entity.student.Student;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 * 成绩
 * @author chenwen
 * @date 2019/9/12 15:02
 */
@Entity
@Setter
@Getter
@Table(name = "sys_scores")
public class Scores extends AbstractBaseEntity {

    /**
     * 分数
     * 唯一性
     */
    @Column(name = "scores")
    private int scores;

    /**
     * 分数类型 一个四级 一个六级
     */
    @Column(name = "scores_type", length = 20, nullable = false)
    @Enumerated(EnumType.STRING)
    private ScoresType scoresType;


    /**
     * 分数对应的学生
     */
    @ManyToOne(targetEntity = Student.class)
    @JoinColumn(name = "student_id")
    private Student studentId ;
}
